<template>
    <div class="result">
        <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
            <el-table-column label="学生姓名" align="center">
                <template slot-scope="scope">
                    {{ scope.row.uname }}
                </template>
            </el-table-column>
            <el-table-column label="班级" align="center">
                <template slot-scope="scope">
                    {{ scope.row.className }}
                </template>
            </el-table-column>
            <el-table-column label="专业" align="center">
                <template slot-scope="scope">
                    {{ scope.row.majorName }}
                </template>
            </el-table-column>
            <el-table-column label="学院" align="center">
                <template slot-scope="scope">
                    {{ scope.row.collegeName }}
                </template>
            </el-table-column>
            <el-table-column label="奖学金" align="center">
                <template slot-scope="scope">
                    {{ scope.row.scholarshipName }}
                </template>
            </el-table-column>
            <el-table-column label="获奖时间" align="center">
                <template slot-scope="scope">
                    {{ scope.row.year }}
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
import { getStuResult } from '@/api/student.js'
export default {
    name: "result",
    data() {
        return {
            list: null,
            listLoading: false,

        }
    },
    mounted() {
        this.getInfo();
    },
    methods: {
        getInfo() {
            this.listLoading = true;
            getStuResult().then(res => {
                this.list = res.data;
                this.listLoading = false;
            })
        }
    },
}
</script>

<style scoped>
.result{
    padding: 10px;
}
</style>